package com.littleken;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class ListCouseServlet
 */
@WebServlet("/ListCouseServlet")
public class ListCouseServlet extends HttpServlet {
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String flag = request.getParameter("flag");
		String data = "";
		if("1".equals(flag)){//Java课程
			data = "Java从入门到进<br>java框架";
		}else if("2".equals(flag)){//C课程
			data = "C程序设计<br>C项目实践";
		}
		//返回数据
		response.getOutputStream().write(data.getBytes("utf-8"));
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request,response);
	}

}
